const { statSync, readSync, openSync, constants } = require('fs');
const { Buffer } = require('buffer');

function read(path) {
    let stat = statSync(path, constants.R_O);
    let buffer = Buffer.alloc(stat.size);
    let size = readSync(openSync(path), buffer, 0, stat.size);
    if (size != stat.size) {
        throw `Not read expected content from config : ${args.config}, ${stat.size} bytes expected but got ${size}`
    }
    return buffer.toString('utf-8');
}

const json = read("./package.json")
const package = JSON.parse(json)
if (!!package.scripts) {
    Object.keys(package.scripts).filter(v => v.startsWith("build")).forEach(v => console.log(v))
}
process.exit(1)